<template>
	<view class="container">
		<z-paging ref="paging" v-model="dataList" @query="queryList">
			<view class="u-m-20  record" v-for="(item,index) in dataList" :key="index"
				@click="$Tips('/pages-landlord/house/receiptNew?start='+item.day)">
				<view class="flex">
					<view class="flex-left">
						<view class="t0">{{item.day}}</view>
						<view class="t1 font-color-red">已收：{{item.pay}}元</view>
						<view class="t2 font-color-green">待收：{{item.un_pay}}元</view>
					</view>
					<view class="flex-right">
						<view class="r0">合计</view>
						<view class="r1"></view>
						<view class="r2 font-color-red">{{item.total_money}}元</view>
					</view>
				</view>
			</view>
		</z-paging>
	</view>
</template>

<script>
	import {
		billDay
	} from '@/api/landlord.js'
	export default {
		data() {
			return {
				dataList: [],
				total: 0
			};
		},
		methods: {
			queryList(pageNo, pageSize) {
				billDay({
					page: pageNo,
					page_size: pageSize
				}).then(res => {
					this.total = res.data.data.total
					this.$refs.paging.complete(res.data.data.data);
				}).catch(res => {
					this.$refs.paging.complete(false);
				})
			},
		},
	};
</script>

<style lang="less" scoped>
	.container {
		min-height: 100vh;
		background-color: #f5f6fa;
	}

	.font-color-red {
		color: red;
	}

	.font-color-green {
		color: green;
	}

	.record {
		box-sizing: border-box;
		padding: 15rpx;
		border-radius: 20rpx;
		background-color: #fff;
		font-size: 26rpx;

		.flex {
			display: flex;
			justify-content: space-between;
			margin: 20rpx 0;
			line-height: 40rpx;

			.flex-left {
				.t0 {}

				.t1 {}

				.t2 {}

				.t3 {}

				.t4 {}
			}

			.flex-right {
				text-align: right;

				.r0 {}

				.r1 {
					height: 40rpx;
				}

				.r2 {}
			}

		}
	}
</style>